package edu.uoc.tfc.gui.common;

import java.io.Serializable;

public class Option implements Serializable, Comparable<Option> {

	private String optionValue;
	private String optionDisplay;
	
	public String getOptionValue() {
		return optionValue;
	}
	public void setOptionValue(String optionValue) {
		this.optionValue = optionValue;
	}
	public String getOptionDisplay() {
		return optionDisplay;
	}
	public void setOptionDisplay(String optionDisplay) {
		this.optionDisplay = optionDisplay;
	}
	
	public Option() {}
	
	/**
	 * Constructor.
	 * @param optionValue
	 * @param optionDisplay
	 */
	public Option(String optionValue, String optionDisplay) {
		this.setOptionValue(optionValue);
		this.setOptionDisplay(optionDisplay);
	}
	public int compareTo(Option compareOption) {
		String compareString = compareOption.getOptionDisplay(); 
		 
		return this.optionDisplay.toLowerCase().compareTo(compareString.toLowerCase());
	}
}
